/**
 * 报价
 * Created by douxc on 2015/4/21.
 */
define(function (require, exports, module) {
  'use strict';
  module.exports = function (app) {
    app.register.controller("FeedListCtrl", ['$scope', 'MHService', function ($scope, MHService) {
      var feeds = MHService.globalData(false, {key: 'feedList'});//读取需要显示的数据
      var _feeds = [];
      for (var obj in feeds) {
        _feeds.push(feeds[obj].showData);//需要显示的数据
      }
      $scope.repeat = _feeds;
      /**
       * 删除材料
       * @param index
       */
      $scope.deleteFeed = function (index) {
        _feeds.splice(index, 1);
        feeds.splice(index, 1);
        MHService.globalData(true, {key: 'feedList', value: feeds});
      };
    }]);
  };
});
